home *** CD-ROM | disk | FTP | other *** search
- This package summarizes my findings on the possibilities of using some of
- the high resolution text modes with Turbo Vision. Included are two demo
- programs to try various modes. The first, LEVEL1, is the simplest but
- will not work with all mouse drivers. LEVEL2 requires more changes but
- overcomes at least some of the mouse driver problems. The executables
- for these two programs are included, but to compile your own modified
- versions, you'll need BP7.0 and the Run Time Library (RTL) source code
- as the library file DRIVERS.PAS needs to be modified.
-
- The stimulus for this investigation was Paradox 4.0. Paradox now has a
- Turbo Vision look and feel and it does support a number of high resolution
- text modes which can be selected from a menu. Once I got into this
- investigation, I was surprised to find that Turbo Vision itself apparently
- has no problems handling odd text modes like 132x44, 80x60, etc. There
- are problems, but they seem to be external to Turbo Vision:
-
- 1. Not all mouse drivers work properly in the HiRes modes. In particular,
- LogiTech drivers do, MicroSoft's don't. Positioning information
- seems to be OK, but the screen is likely to get messed up with mouse
- droppings. I haven't had a chance to try other drivers.
-
- 2. There's apparently no standard for hires modes. Basic video boards
- don't support any. For more deluxe boards, different manufacturers
- support different modes.
-
- 3. Even if the video board support a particular mode the monitor may not
- be able to synchronize satisfactorily.
-
- 4. There seems to be no way for the software to tell in advance if a
- mode is supported. The effects of attempting to change to an
- unsupported mode vary. Often nothing happens. Other times the screen
- may black out or become extremely garbled.
-
- 5. The possibility exists for damage to the monitor for modes that
- don't synchronize correctly. Don't leave a monitor in a condition
- where it's obviously not working correctly. It may be necessary to
- reboot.
-
- Below is a summary of various hires modes. This info comes from the file,
- PARADOX.VID, which apparently is the basis for the Paradox video menu
- selection list.
-
- Board Mode (decimal) Width x Height
-
- VGA Wizard 50 80x34
- 51 80x45
- 35 132x25
- 34 132x44
-
- ATI VGA 35 132x25
- 51 132x44
-
- Compaq VGS 35 132x25
- 36 132x28
- 34 132x43
- 39 132x50
- 40 132x60
-
- Genoa VGA 35 132x25
- 36 132x28
- 34 132x43
-
- Orchid VGA 38 80x60
- 35 132x25
- 36 132x28
- 34 132x44
-
- Paradise EGA/VGA 85 132x25
- 84 132x43
-
- Sigma VGA 28 132x25
- 29 132x44
-
- STB VGA 35 132x25
- 34 132x44
-
- PARADOX.VID also contains info on Video-7 and Everex boards, but I'm not
- able at present to interpret exactly what it means. At this time, I've
- had success using the Orchid (but with a Cardinal video card) and ATI
- modes listed above.
-
-
- Program Level1
-
- Level1 is a demo program which may work depending on your mouse driver.
- From the Video selection in the menu, you can select the normal TV
- 80x25 and 80x50 modes along with 'Other'. 'Other' brings up an inputbox
- in which you can enter a mode number to see what happens next.
-
- A window contains information on the present state--the mode number,
- the contents of StartUpMode, and the current screen height and width.
- StartUpMode is the mode from which the program was called and is used
- to restore that mode on exit or when shelling to DOS.
-
- To compile Level1.pas, you first have to modify DRIVERS.PAS. The single
- modification consists of commenting out the last line of FixCrtMode, thus:
-
- (*MOV AX,smCO80 *)
-
- FixCrtMode is a routine which limits the video mode to monochrome or the
- standard VGA color modes. Removing the last line effectively disables the
- routine so that any mode may be programed.
-
- When doing a make on Level1.pas, the object directory list should include
- the directory where sysint.obj is located and the unit directory list
- should include the TV source directory (normally \bp\rtl\tv).
-
-
- Program Level2
-
- If the mouse causes problems in the Level1 program, it's time to move on to
- Level2. In Level2, the mouse driver cursor is hidden and the
- cursor displayed from DRIVERS.PAS. The modifications required for
- DRIVERS.PAS are much more substantial. Here they are:
-
- Add the following to the Interface section:
-
- const
- SimulatedMouse : boolean = False; {indicates if simulated mouse active}
-
- procedure SimMouse; {switch to simulated mouse}
- procedure DriverMouse; {switch to normal driver mouse cursor}
-
- These are the calls to switch back and forth between the normal usual mouse
- cursor and the simulated cursor.
-
- Add the following just before the MouseInt procedure:
-
- var
- OldPos : word; {marks the current mouse position}
- HideCount : integer; {simulated mouse Hide count}
-
- procedure SimMouse;
- begin
- HideMouse;
- SimulatedMouse := True;
- HideCount := 0;
- end;
-
- procedure DriverMouse;
- begin
- SimulatedMouse := False;
- ShowMouse;
- end;
-
- In MouseInt, change the lines:
-
- @@1: MOV EventQTail,DI
- INC EventCount
- @@2: MOV MouseIntFlag,1
- end;
-
- to:
-
- @@1: MOV EventQTail,DI
- INC EventCount
- @@2: cmp SimulatedMouse,0
- je @@3 {this code for software mouse only}
- cmp HideCount,0
- ja @@3 {mouse is hidden}
- mov al, ScreenWidth
- xor ah,ah
- mul mouseWhere.Y
- add ax, MouseWhere.X
- shl ax,1
- les di, ScreenBuffer
- add di,ax
- cmp di,OldPos
- je @@3 {no position change}
- push di
- mov di, OldPos {change the old position back}
- mov ax, ES:[di]
- xor ah, $77 {invert the colors to where they were}
- mov ES:[di], ax
- pop di
- mov ax, ES:[di]
- xor ah, $77 {invert the colors}
- mov ES:[di], ax
- mov OldPos,di {and save the position}
- @@3: MOV MouseIntFlag,1
- end;
-
- Just before the ShowMouse procedure add:
-
- procedure ShowMouse1;
- begin
- Dec(HideCount);
- if HideCount < 0 then HideCount := 0; {synchronize}
- if HideCount = 0 then {make mouse visible}
- begin
- asm
- mov al, ScreenWidth
- xor ah,ah
- mul mouseWhere.Y
- add ax, MouseWhere.X
- shl ax,1
- les di, ScreenBuffer
- add di,ax
- mov ax, ES:[di]
- xor ah, $77 {invert the colors}
- mov ES:[di], ax
- mov OldPos,di {and save the position}
- end;
- end;
- end;
-
- At the start of the ShowMouse procedure change the following:
-
- asm
- CMP ButtonCount,0
- JE @@1
- PUSH AX
-
- to:
-
- asm
- CMP ButtonCount,0
- JE @@1
- cmp SimulatedMouse,0
- je @@2
- push ax
- push bx
- push cx
- push dx
- push si
- push di
- push es
- call ShowMouse1
- pop es
- pop di
- pop si
- pop dx
- pop cx
- pop bx
- pop ax
- jmp @@1
-
- @@2: PUSH AX
-
-
- Just before the HideMouse procedure, add:
-
- procedure HideMouse1;
- begin
- if HideCount = 0 then
- begin {remove from screen}
- asm
- les di, ScreenBuffer
- mov di, OldPos
- mov ax, ES:[di]
- xor ah, $77 {invert the colors}
- mov ES:[di], ax
- end;
- end;
- Inc(HideCount);
- end;
-
- In the HideMouse procedure, change:
-
- asm
- CMP ButtonCount,0
- JE @@1
- PUSH AX
-
- to:
-
- asm
- CMP ButtonCount,0
- JE @@1
- cmp SimulatedMouse,0
- je @@2
- push ax {save everything}
- push bx
- push cx
- push dx
- push si
- push di
- push es
- call HideMouse1
- pop es
- pop di
- pop si
- pop dx
- pop cx
- pop bx
- pop ax
- jmp @@1
-
- @@2: PUSH AX
-
-
- As in Level1, delete or comment out the last line in FixCrtMode, as:
-
- (*MOV AX,smCO80 *)
-
-
- For those of you trying out these demo programs, I'd be happy to hear about
- your success (or lack thereof) particulary for the modes and mouse
- drivers I haven't been able to try. Best way is via CompuServe:
-
- Dave Baldwin
- CompuServe ID : 76327,53
-
- 144 13th St East,
- Tierra Verde, FL 33715 {winter}
- (813) 867-3030
-
- 22 Fox Den Rd., {summer}
- Hollis, NH 03049
- (603) 465-7857
-
- ----------------end-of-author's-documentation---------------
-
- Software Library Information:
-
- This disk copy provided as a service of
-
- Public (software) Library
-
- We are not the authors of this program, nor are we associated
- with the author in any way other than as a distributor of the
- program in accordance with the author's terms of distribution.
-
- Please direct shareware payments and specific questions about
- this program to the author of the program, whose name appears
- elsewhere in this documentation. If you have trouble getting
- in touch with the author, we will do whatever we can to help
- you with your questions. All programs have been tested and do
- run. To report problems, please use the form that is in the
- file PROBLEM.DOC on many of our disks or in other written for-
- mat with screen printouts, if possible. PsL cannot debug pro-
- programs over the telephone, though we can answer questions.
-
- Disks in the PsL are updated monthly, so if you did not get
- this disk directly from the PsL, you should be aware that the
- files in this set may no longer be the current versions. Also,
- if you got this disk from another vendor and are having prob-
- lems, be aware that some files may have become corrupted or
- lost by that vendor. Get a current, working disk from PsL.
-
- For a copy of the latest monthly software library newsletter
- and a list of the 4,000+ disks in the library, call or write
-
- Public (software) Library
- P.O.Box 35705 - F
- Houston, TX 77235-5705
-
- 1-800-2424-PSL
- MC/Visa/AmEx/Discover
-
- Outside of U.S. or in Texas
- or for general information,
- Call 1-713-524-6394
-
-